package cn.mill.demo.weixin;

import cn.mill.common.HttpMethod;
import cn.mill.common.Tag;
import cn.mill.common.annotation.HttpDefine;
import cn.mill.common.annotation.MethodMapping;
import cn.mill.common.annotation.Property;
import cn.mill.common.annotation.ServiceDefine;

@ServiceDefine(name = "weixin", node = "weixin", protocol = "https", strategy = "json")
public interface WeixinHandler {
	@HttpDefine(method = HttpMethod.GET)
	@MethodMapping(value = "/token?grant_type=client_credential&appid={APPID}&secret={APPSECRET}", tip = "获取Access token")
	public Access getAccessToken(@Property(name = "APPID", tag = Tag.URL) String appId, @Property(name = "APPSECRET", tag = Tag.URL) String secret);
	
	@HttpDefine(method = HttpMethod.GET)
	@MethodMapping(value = "/getcallbackip?access_token={access_token}", tip = "获取微信callback IP地址")
	public Ips getWeiXinIp(Access access);
	
}
